<!-- 提交按钮 -->

<template>
  <view class="bottom-button">
    <view class="inner-cancel inner-item" @click="onCancel">
      取消
    </view>
    <view class="inner-submit inner-item" @click="onSubmit">
      提交
    </view>
  </view>
</template>

<script>
  import {
    navBack
  } from '../../utils/util'

  export default {
    props: {
      text: {
        type: String,
        default: ''
      }
    },
    methods: {
      onSubmit() {
        this.$emit('submit')
      },
      onCancel() {
        navBack()
        this.$emit('cancel')
      }
    }
  }
</script>

<style lang="scss" scoped>
  .bottom-button {
    height: 104rpx;
    background: #FFFFFF;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    display: flex;
    align-items: center;
    justify-content: center;

    .inner-item {
      width: 320rpx;
      height: 80rpx;
      background: #2488F5;
      border-radius: 40rpx 40rpx 40rpx 40rpx;
      font-weight: 500;
      font-size: 30rpx;
      color: #F9F9F9;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .inner-cancel {
      background: #EBEBEB;
      color: #1A1A1A;
    }
  }
</style>